﻿using GmailChecker.Properties;

namespace GmailChecker.Utils
{
    static class AppSettings
    {                
        public static string Email
        {
            get
            {
                return (string)Settings.Default["Email"];
            }
            set 
            { 
                Settings.Default["Email"] = value;
                Settings.Default.Save();
            }
        }
              
        public static string Password
        {
            get
            {
                return Cryptography.DecryptString((string)Settings.Default["Password"]);
            }
            set
            {
                Settings.Default["Password"] = Cryptography.EncryptString(value);
                Settings.Default.Save();
            }
        }                       
    }
}
